package com.jd.goods.service.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jd.goods.mapper.GoodsCategorySpecificationMapper;
import com.jd.goods.pojo.GoodsCategorySpecification;
import com.jd.goods.service.GoodsCategorySpecificationService;

@Service("goodsCatSpecService")
public class GoodsCatSpecServiceImpl implements
		GoodsCategorySpecificationService {
	@Autowired
	private GoodsCategorySpecificationMapper goodsCatSpecMapper;
	@Override
	public GoodsCategorySpecification getGoodsCategorySpecification(Long catId) {
		
		return goodsCatSpecMapper.getGoodsCategorySpecificationByCatId(catId);
	}

	@Override
	public int add(GoodsCategorySpecification spec) {
		spec.setCreated(new Date());
		spec.setUpdated(new Date());
		return goodsCatSpecMapper.add(spec);
	}

}
